<include file="Public/header"/>
<body class="body-bg">
<div class="park-header">
    <div class="park-header__title">订单详情</div>
    <div class="park-header__left park-back">
        <i class="iconfont icon-fanhui"></i>
    </div>
</div>
<div class="orderDetail-nav-tabs">
    <ul>
        <li class="active" data-target="#status">订单状态</li>
        <li data-target="#detail">订单详情</li>
    </ul>
</div>
<div class="container">
    <div id="status" class="order-status-list" style="display: none;">
        <div class="order-status-list__line"></div>
        <volist name="info['status_list']" id="val">
        <div class="order-status-item">
            <div class="order-status-item__title">
                <span class="title">{$val.title}</span>
                <span class="time">{$val.add_time|date='m-d H:i',###}</span>
            </div>
            <p class="order-status-item__text">{$val.contents}</p>
            <div class="order-status-item__point"></div>
        </div>
        </volist>
    </div>
    <div id="detail" class="order-detail" style="display: none;">
        <div class="park-cart-store-list">
            <div class="park-cart-store-item">
                <div class="park-cart-store-item__title">
                    <div class="left"><span>订单号：{$info.order_sn}</span></div>
                    <div class="right"><span class="park-green">
                        <if condition="$info['status'] eq 1">
                            待支付
                        <elseif condition="$info['status'] eq 4" />
                            已取消
                        <else/>

                        </if>
                    </span></div>
                </div>
                <div class="park__goods">
                    <ul>
                        <volist name="info['goods_list']" id="val">
                        <li>
                            <div class="park-goods__pic" style="background-image: url('{$val.thumb}')"></div>
                            <div class="park-goods__info">
                                <p class="name">{$val.goods_name}</p>
                                <p class="desc">{$val.store_name}</p>
                                <p class="spec">规格：{$val.spec_name}</p>
                                <p class="price-line">
                                    <span class="price">￥<em>{:intval($val['goods_price'])}</em>{:substr($val['goods_price'],-3,3)}</span>
                                </p>
                            </div>
                            <div class="park-goods__pos">
                                <span class="num">X{$val.goods_number}</span>
                            </div>
                        </li>
                        </volist>
                    </ul>
                </div>
            </div>
        </div>
        <div class="park-row-list">
            <div class="park-row-item">
                <div class="park-row-item__left">
                    <span>配送地址:</span>
                </div>
                <div class="park-row-item__right">
                    <span>{$info.address}</span>
                </div>
            </div>
            <div class="park-row-item">
                <div class="park-row-item__left">
                    <span>配送方式:</span>
                </div>
                <div class="park-row-item__right">
                    <span>达达配送</span>
                </div>
            </div>
            <div class="park-row-item" style="display:none;">
                <div class="park-row-item__left">
                    <span>配送员:</span>
                </div>
                <div class="park-row-item__right">
                    <span>张爷爷&nbsp;<em class="park-orange">15875645458</em></span>
                </div>
            </div>
            <div class="park-row-item">
                <div class="park-row-item__left">
                    <span>下单时间</span>
                </div>
                <div class="park-row-item__right">
                    <span>{$info.add_time|date="Y-m-d H:i:s",###}</span>
                </div>
            </div>
            <div class="park-row-item">
                <div class="park-row-item__left">
                    <span>订单备注:</span>
                </div>
                <div class="park-row-item__right">
                    <span>{$info.order_remark}</span>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        $(document).on('click', '.orderDetail-nav-tabs li', function () {
            var li = $('.orderDetail-nav-tabs li');
            $.each(li, function (ind, val) {
                $($(val).removeClass('active').attr('data-target')).hide();
            });
            $($(this).addClass('active').attr('data-target')).show();
        });

        $('.orderDetail-nav-tabs li').eq(0).trigger('click');
    });
</script>
</body>
</html>